package znbkTopicType;

import android.util.Log;
import android.widget.BaseAdapter;

import com.example.lancooznbk.view.widget.VoicePlayer;

/**
 * Created by tangminglong on 17/8/31.
 * 对音频进行一次封装，建议所有的Adapter都继承该类
 */

public abstract class WrapBaseAdapter extends BaseAdapter {
    protected VoicePlayer mVoicePlayer;

    public   void play(){
        if (mVoicePlayer != null){
            mVoicePlayer.play();
        }
    }

    public  void pause(){
        if (mVoicePlayer != null){
            Log.e("===GuessTesting===","===888888666666===");
            mVoicePlayer.pause();
        }
    }

    public  void stop(){
        if (mVoicePlayer != null){
            mVoicePlayer.stop();
        }

        mVoicePlayer = null;
    }

}
